package edu.sctu.practice.class02.yangyiqing.exam.test11;

/**
 * Created by Administrator on 2015/10/15 0015.
 */
public class MyTime {

        private int hour;
        private int minute;
        private int second;

        public MyTime(int hour, int minute, int second) {
            this.hour = hour;
            this.minute = minute;
        }

        public void diaplay() {
            System.out.println("Hour:" + hour + "  Minute:" + minute + "  Second:" + second);
        }

        public void addSecond(int sec) {
            second = second + sec;
        }

        public void addMinute(int min) {
            minute = minute + min;
        }

        public void addHour(int hou) {
            hour = hour + hou;
        }

        public void subSecond(int sec) {
            second = second - sec;
        }

        public void subMinute(int min) {
            minute = minute - min;
        }

        public void subHour(int hou) {
            hour = hour - hou;
        }


    }

